package io.gitee.zhangbinhub.admin.common.health

import io.gitee.zhangbinhub.acp.boot.constant.AcpCoreConstant
import org.noear.solon.health.detector.Detector
import kotlin.collections.set
import kotlin.jvm.java

class AcpAdminDependenciesDetector : Detector {
    override fun getName(): String = "acp-admin-cloud-dependencies"

    override fun getInfo(): MutableMap<String, *> {
        val info: MutableMap<String, String?> = kotlin.collections.HashMap()
        info[AcpCoreConstant.INFO_VERSION_KEY] = getVersion()
        return info
    }

    private fun getVersion(): String? {
        return AcpAdminDependenciesDetector::class.java.getPackage()?.implementationVersion
    }
}